package com.zbf.web;

import com.zbf.utils.ImageHandlerUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

/**
 * @author: LCG
 * @Date: 2021-11-29 18:12:31
 * @description:
 **/
public class TestController {
    public static void main(String[] args) throws IOException {
        /*File file = new File("E:\\IMAGE2\\130吹填船只.jpg");
        ImageHandlerUtils.shuiYinChuLi2("E:\\IMAGE2\\130吹填船只-1.jpg",file);*/

        String html="<p><span style=\"font-size: 14px;\">招牌梨汤</span></p>\n" +
                "<p><img src=\"https://assets.xingqutuan.cn/9b57d2483c68913fbc0837620816b213.jpeg\" alt=\"\" width=\"640\" /></p>\n" +
                "<p><span style=\"color: #333333; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif; font-size: 14px; background-color: #f5f7fa;\">腐竹菠菜</span></p>\n" +
                "<p><img src=\"https://assets.xingqutuan.cn/11f3e358999606a07888a8b46a6bf22f.jpeg\" alt=\"\" width=\"690\" /></p>\n" +
                "<p><span style=\"font-size: 14px;\">北京烤鸭</span></p>\n" +
                "<p><img src=\"https://assets.xingqutuan.cn/a5d6365b65bcbee0b6a1fce6ba32d0e3.jpeg\" alt=\"\" width=\"700\" /></p>";
        ImageHandlerUtils imageUtils=new ImageHandlerUtils();
        List<String> imageUrlFromHtml = imageUtils.getImageUrlFromHtml(html);
        String imageHtml = imageUtils.setImageUrlFromHtml(html, imageUrlFromHtml);
        System.out.println("000999000-"+imageHtml);
    }
}
